<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理后台</title>
<link rel="stylesheet" href="<?php echo IUrl::creatUrl("")."views/".$this->theme."/skin/".$this->skin."/css/admin.css";?>" />
<script charset="UTF-8" src="/runtime/systemjs/jquery-1.4.4.min.js"></script>
<script charset="UTF-8" src="/runtime/systemjs/artdialog/artDialog.min.js"></script>
<script charset="UTF-8" src="/runtime/systemjs/form.js"></script>
<link rel="stylesheet" type="text/css" href="/runtime/systemjs/autovalidate/style.css"/><script charset="UTF-8" src="/runtime/systemjs/autovalidate/validate.js"></script>
<script type='text/javascript' src="<?php echo IUrl::creatUrl("")."views/".$this->theme."/javascript/admin.js";?>"></script>
<script type='text/javascript' src="<?php echo IUrl::creatUrl("")."views/".$this->theme."/javascript/menu.js";?>"></script>
</head>
<body style="width:600px">
<div class="pop_win" style="width:600px">
<form action="" method="post" id="list">
	<table class="spec" width="100%" cellspacing="0" cellpadding="0" border="0" id="list" >
		<tr>
			<td>
				<h3>请选择商品 <button type="button" class="btn f_r" onclick="conversion();"><span class="sel">筛 选</span></button></h3>
				<div id="specs">
					<div class="cont" >
						<ul>
							<?php foreach($this->arr as $key => $item){?>
							<li>
								<label><input type="checkbox" onclick="select(this.id);" autocomplete="off" name = "selec" value="<?php echo isset($item['goods_id'])?$item['goods_id']:"";?>,<?php echo isset($item['id'])?$item['id']:"";?>,<?php echo isset($item['name'])?$item['name']:"";?>,<?php echo isset($item['sell_price'])?$item['sell_price']:"";?>,<?php echo isset($item['weight'])?$item['weight']:"";?>,<?php echo isset($item['point'])?$item['point']:"";?>,<?php echo isset($item['exp'])?$item['exp']:"";?>" /><?php echo isset($item['name'])?$item['name']:"";?>&nbsp;&nbsp;
								<?php if($item['spec_array']!='0'){?>
									<?php $arr = unserialize($item['spec_array']);?>
									<?php foreach($arr as $key => $cc){?>
										<?php $query = new IQuery("spec");$query->fields = "name,type";$query->where = "id = $cc[id]";$items = $query->find(); foreach($items as $key => $va){?>
											<?php echo $va['name'];?>:<?php if($va['type']==1){?><?php echo isset($cc['value'])?$cc['value']:"";?><?php }else{?><img src="<?php echo IUrl::creatUrl("")."$cc[value]";?>" width="15px" height="15px" class='spec_photo' /><?php }?>&nbsp;
										<?php }?>
									<?php }?>
								<?php }?>
								</label>
							</li>
							<?php }?>
						</ul>
					</div>
				<?php echo $this->paging->getPageBar();?>
				</div>
			</td>
		</tr>
	</table>
</form>
<form action="<?php echo IUrl::creatUrl("/");?>" method="get" name="search_user">
	<input type='hidden' name='controller' value='order' />
	<input type='hidden' name='action' value='search_goods' />
	<table class="spec" width="100%" cellspacing="0" cellpadding="0" border="0" id="selec" style="display:none">
		<tr>
				<td>
					<h3>选择筛选商品条件:
					</h3>
					<div class="cont">
					<table class="form_table">
						<col width="106px" />
						<col width="120px" />
						<col width="120px" />
						<col />
						<tr>
							<th>商品名称：</th>
							<td>
								<select class="middle" id="name_where" name="name_where">
								<option value="like" <?php if($name_where=='like'){?>selected<?php }?>>包含</option>
								<option value="eq" <?php if($name_where=='eq'){?>selected<?php }?>>等于</option>
								</select>
							</td>
							<td>
								<input class="small" type="text" id="goods_name" name="goods_name" value="<?php echo isset($goods_name)?$goods_name:"";?>"/>
							</td>
						</tr>
						<tr>
							<th>货号：</th>
							<td>
								<select class="middle" id="code_where" name="code_where">
								<option value="like" <?php if($code_where=='like'){?>selected<?php }?>>包含</option>
								<option value="eq" <?php if($code_where=='eq'){?>selected<?php }?>>等于</option>
								</select>
							</td>
							<td>
								<input class="small" type="text" id="goods_code"name="goods_code" value="<?php echo isset($goods_code)?$goods_code:"";?>"/>
							</td>
						</tr>

						<tr>
							<th>价格：</th>
							<td>
								<select class="middle" id="price_where" name="price_where">
								<option value="like" <?php if($price_where=='like'){?>selected<?php }?>>包含</option>
								<option value="eq" <?php if($price_where=='eq'){?>selected<?php }?>>等于</option>
								</select>
							</td>
							<td>
								<input class="small" type="text" id="price" name="price" value="<?php echo isset($price)?$price:"";?>"/>
							</td>
						</tr>
					</table>
					</div>
				</td>
			</tr>
		<tr>
			<td class="t_c">
				<button type="button" class="submit" onclick="checkForm();"><span>筛选并返回列表</span></button>
			</td>
		</tr>
	</table>
</form>
</div>
<script type="text/javascript">
function checkForm()
{
	document.search_user.submit();
}
function conversion()
{
	$("#list").toggle();
	$("#selec").toggle();
}
</script>
</body>
</html>

